import { PageVO } from '@/common/vo';
import Axios, { downLoadFile } from '@/utils/request';
import { DaySendListReqVO, HistorySendListReqVO } from '../vo/warning-notice';

export default class API {
    /**
     * 邮件规则页面发送邮件
     * @returns
     */
    static sendEmail(data: any): Promise<any> {
        return Axios.post('/notice/monitor/rule/sendEmail', data);
    }

    /**
     * 邮件规则页面单条规则发送记录
     * @returns
     */
    static ruleSendRecord(data: { ruleId: string; noticeType: string }): Promise<any> {
        return Axios.post('/notice/monitor/record/listRecord', data);
    }

    /*************** 邮件管理 *******************/
    /**
     * 当日列表查询
     * @returns
     */
    static daySendList(data: DaySendListReqVO): Promise<any> {
        return Axios.post('/notice/monitor/record/list', data);
    }

    /**
     * 当日列表行获取条目明细
     * @returns  { noticeType: string; recordId: string; paging: PageVO }
     */
    static getDetailsList(data: any): Promise<any> {
        return Axios.post('/notice/monitor/record/getDetailsList', data);
    }

    /**
     * 当日再发送
     * @returns
     */
    static recordSendEmail(data: any): Promise<any> {
        return Axios.post('/notice/monitor/record/recordSendEmail', data);
    }

    /**
     * 当日列表数据关闭
     * @returns
     */
    static sendClose(data: any): Promise<any> {
        return Axios.post('/notice/monitor/record/close', data);
    }

    /**
     * 当日列表数据删除
     * @returns
     */
    static sendDelete(data: { recordIds: string[] }): Promise<any> {
        return Axios.post('/notice/monitor/record/delete', data);
    }

    /**
     * 历史列表查询
     * @returns
     */
    static historySendList(data: HistorySendListReqVO): Promise<any> {
        return Axios.post('/notice/monitor/record/history/list', data);
    }
}
